<template>
  <div>
    <h1 align="center">默认页面</h1>
  </div>
</template>

<script>
import { CondTypes,KeyTypes } from '@/utils/constant';
import axios from 'axios'

export default {
  data(){
    return {
      dynamicSearch: []
    }
  },
  created(){
    this.doSearch();
  },
  methods: {
    async doSearch(){
      this.dynamicSearch.push({
        FieldName: "WFCode",
        ConditionalType: CondTypes.Equal,
        FieldValue: "0053"
      });
      this.dynamicSearch.push({
        FieldName: "CurrentState",
        ConditionalType: CondTypes.Equal,
        FieldValue: "1343"
      });
      this.dynamicSearch.push({
        FieldName: "WorkingRemark",
        ConditionalType: CondTypes.LikeLeft,
        FieldValue: "开发商[山东玖典置业有限公司]的项目"
      });
      this.dynamicSearch.push({
        FieldName: "IsDeleted",
        ConditionalType: CondTypes.Equal,
        FieldValue: "0"
      });
      // 二级查询条件构建
      this.dynamicSearch.push({
        ConditionalList: [
          {
            Key: KeyTypes.AND,
            Value: {
              FieldName: "StartTime",
              ConditionalType: CondTypes.Range,
              FieldValue: "2023-01-01,2024-12-27"
            }
          }
        ]
      });
      
      let data = JSON.stringify(this.dynamicSearch);
      axios.get("/api/dynamic/GetWorkingList",{ params: {"dynamicQuery": data}}).then(res=>{
        console.log(res);
        
      }).catch(err=>{
        console.log(err);
        
      })
    }
  }
}
</script>

<style>

</style>